<template>
	<view class="ljapp doctor">
		<view class="header" :style="'background-image: url('+$base.cdn('/uploads/20220414/ba118f57f6fd2710ba61ce98fac5b162.png')+');'">
			<u-navbar placeholder leftIconColor="#fff" titleStyle ="color:#fff;" title="维普互联网医院" :bgColor="'rgba(61,199,135,'+navbarBgAlpha+')'" @leftClick="goto('/pages/my/change')"></u-navbar>
			<view class="outer">
				<view class="userinfo u-flex u-flex-y-center">
					<image class="avatar" :src="$base.cdn(userInfo&&userInfo.pharmacist_info?userInfo.pharmacist_info.img:'','/static/lj/common/default-doctor.png')" mode="aspectFill"></image>
					<view v-if="userInfo.pharmacist_info">
						<view class="nickname u-flex">
							<view>{{userInfo.pharmacist_info.name}}</view>
							<view class="tag">{{userInfo.pharmacist_info.academic_title}}</view>
						</view>
						<view class="phone">{{userInfo.pharmacist_info.mobile}}</view>
					</view>
				</view>
			</view>
		</view>
		
		<view class="content">
			<view class="card">
				<view class="head">
					<view class="title font-b">订单中心</view>
					<view class="con u-flex">
						<view>平台累计订单：{{userInfo.pharmacist_info && userInfo.pharmacist_info.all_count?userInfo.pharmacist_info.all_count:0}}</view>
						<view style="margin-left: 72rpx;">已审核：{{userInfo.pharmacist_info && userInfo.pharmacist_info.yes_count?userInfo.pharmacist_info.yes_count:0}}</view>
					</view>
				</view>
				<view class="cellbox cellbox1 flex-row-between" @click="goto('/pagesA/prescript/order1?mode=normal')">
					<image class="icon" src="/static/lj/common/group_607.png" mode="aspectFill"></image>
					<view class="flex-1">
						<view class="font17 font-b">
							<text style="color: #222222;">待审核订单:</text>
							<text style="color: #DF7E00;margin-left: 4rpx;">{{userInfo.pharmacist_info && userInfo.pharmacist_info.normal_count?userInfo.pharmacist_info.normal_count:0}}</text>
						</view>
						<view class="font14" style="color: #666666;margin-top: 8rpx;">系统未审核药方订单</view>
					</view>
					<view class="bnt flex-row-center font15 font-ffffff">去审核</view>
				</view>
				<view class="cellbox cellbox2 flex-row-between" @click="goto('/pagesA/prescript/order1?mode=yes&isme=1')">
					<image class="icon" src="/static/lj/common/group_608.png" mode="aspectFill"></image>
					<view class="flex-1">
						<view class="font17 font-b">
							<text style="color: #222222;">我审核订单:</text>
							<text style="color: #128767;margin-left: 4rpx;">{{userInfo.pharmacist_info && userInfo.pharmacist_info.me_count?userInfo.pharmacist_info.me_count:0}}</text>
						</view>
						<view class="font14" style="color: #666666;margin-top: 8rpx;">我审核通过的药方订单</view>
					</view>
					<view class="bnt flex-row-center font15 font-ffffff">去查看</view>
				</view>
				<!-- <view class="cellbox u-flex u-flex-between">
					<view class="item u-flex" :style="'background-image: url('+$base.cdn('/uploads/20220414/a5ee91fcdd81c12684c0d4bbcf8b33ce.png')+');'" @click="goto('/pagesA/prescript/order1?mode=normal')">
						<image class="icon" src="/static/lj/common/group_607.png" mode="aspectFill"></image>
						<view class="inner">
							<view class="tit">待审核订单：<text style="color:#f60000;">{{userInfo.pharmacist_info && userInfo.pharmacist_info.normal_count?userInfo.pharmacist_info.normal_count:0}}</text></view>
							<view class="con">系统未审核药方订单</view>
						</view>
					</view>
					<view class="item u-flex" :style="'background-image: url('+$base.cdn('/uploads/20220414/0b1c2651d372030fbcf1280e8bd1838b.png')+');'" @click="goto('/pagesA/prescript/order1?mode=yes&isme=1')">
						<image class="icon" src="/static/lj/common/group_608.png" mode="aspectFill"></image>
						<view class="inner">
							<view class="tit">我审核订单：<text>{{userInfo.pharmacist_info && userInfo.pharmacist_info.me_count?userInfo.pharmacist_info.me_count:0}}</text></view>
							<view class="con">我审核通过的药方订单</view>
						</view>
					</view>
				</view> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				navbarBgAlpha: 0,
				userInfo: {}
			}
		},
		onLoad() {
			uni.hideTabBar()
			this.$Http({
				url: 'getUserInfo',
				type: 'POST',
				data: {}
			}).then(res => {
				res.data.pharmacist_info.img = this.$store.state.http_img + res.data.pharmacist_info.img
				this.userInfo = res.data
			})
		},
		onPageScroll: function(e) {
			var a = e.scrollTop/80
			this.navbarBgAlpha = a>1?1:a
		},
		methods: {
			goto(e){
				uni.navigateTo({
					url: e
				})
			},
		}
	}
</script>

<style lang="less">
	// @import url("style.less");
	page{
		background-color: #f6f6f6;
	}
	
	.title{
		position: relative;
		line-height: 40rpx;
		padding-left: 28rpx;
		
		&:after{
			content: '';
			position: absolute;
			top: 4rpx;
			left: 6rpx;
			width: 6rpx;
			height: 32rpx;
			border-radius: 6rpx;
			background-color: #3dc787;
		}
	}
	
	.header{
		position: relative;
		background-color: #fff;
		background-position: center bottom;
		background-repeat: no-repeat;
		background-size: cover;
	
		.outer{
			margin-top: 24rpx;
			.userinfo{
				position: relative;
				padding: 0 80rpx 44rpx;
				color: #fff;
				.avatar{
					width: 116rpx;
					min-width: 116rpx;
					height: 116rpx;
					border-radius: 50%;
					margin-right: 20rpx;
				}
				
				.nickname{font-size: 28rpx;}
				.tag{
					margin-left: 26rpx;
					line-height: 38rpx;
					padding: 0 14rpx;
					font-size: 22rpx;
					background-color: #3fad7a;
				}
				.phone{
					margin-top: 10rpx;
				}
			}
			
		}
	}

	.content{
		padding: 20rpx;
		.card{
			background-color: #fff;
			border-radius: 10rpx;
			padding-bottom: 30rpx;
				
			.head{
				border-bottom: 2rpx solid #ebebeb;
				padding: 24rpx 30rpx;
				
				.con{
					margin-left: 20rpx;
					margin-top: 20rpx;
					color: #666666;
					font-size: 28rpx;
				}
			}
			.cellbox{
				width: 656rpx;
				height: 180rpx;
				opacity: 0.8;
				border-radius: 14rpx;
				margin: 30rpx 27rpx 0 27rpx;
				padding: 0 20rpx;
				.icon{
					width: 86rpx;
					height: 86rpx;
					margin-right: 20rpx;
				}
				.bnt{
					width: 171rpx;
					height: 61rpx;
					opacity: 1;
					border-radius: 33rpx;
				}
			}
			.cellbox1{
				background: #F8EFDD;
				.bnt{
					background: #E58B16;
				}
			}
			.cellbox2{
				background: #E6F8F2;
				.bnt{
					background: #14BC8D;
				}
			}
			// .cellbox{
			// 	padding: 40rpx 16rpx 60rpx;
			// 	.item{
			// 		// width: 324rpx;
			// 		width: 330rpx;
			// 		height: 142rpx;
			// 		padding: 32rpx 18rpx;
			// 		padding-right: 8rpx;
			// 		border-radius: 10rpx;
			// 		color: #fff;
					
			// 		background-color: #fff;
			// 		background-position: center center;
			// 		background-repeat: no-repeat;
			// 		background-size: 100% auto;
					
			// 		.icon{
			// 			display: block;
			// 			width: 74rpx;
			// 			min-width: 74rpx;
			// 			height: 74rpx;
			// 			margin-right: 12rpx;
			// 		}
			// 		.inner{}
			// 		.tit{
			// 			width: 100%;
			// 		}
			// 		.con{
			// 			font-size: 22rpx;
			// 			margin-top: 10rpx;
			// 		}
			// 	}
				
			// }
		}
	}
	
</style>
